package com.training.admin.dao;

import java.util.List;

import com.demo2do.core.persistence.annotation.Dao;
import com.demo2do.core.persistence.annotation.Query;
import com.demo2do.core.persistence.annotation.Variable;
import com.training.admin.entity.dynamic.report.DynamicReport;
import com.training.admin.entity.dynamic.report.DynamicReportData;
/**
 * 
 * @author Rockett
 *
 */
@Dao("hibernate")
public interface DynamicReportDao {
	
	/**
	 * 
	 * @param name
	 * @return
	 */
	@Query("FROM DynamicReport WHERE disabled = false and name =:name ")
	public List<DynamicReport> listByName(@Variable("name") String name);
	/**
	 * 
	 * @param reportId
	 * @return
	 */
	@Query("FROM DynamicReportData WHERE disabled = false and dynamicReport.id =:reportId ")
	public List<DynamicReportData> listByReportId(@Variable("reportId") Long reportId);
	
	
}
